package com.grape.juc.thread.realize;

/**
 * 描述:匿名内部类实现多线程
 * @author: myx
 * @date: 2019-05-05
 * Copyright © 2019-grape. All rights reserved.
 */
public class AnonymousMethod {
    public static void main(String[] args) {
        System.out.println("-----多线程创建开始-----");
        Thread thread = new Thread(() ->{
            for (int i = 0; i< 10; i++) {
                System.out.println("i:" + i);
            }
        });
        thread.start();
        System.out.println("-----多线程创建结束-----");
    }
}
